package sudroid.android;

import android.os.AsyncTask;
import android.os.AsyncTask.Status;

public abstract class SafeTask<Params, Progress, Result>
{
  private AsyncTask<Params, Progress, Result> asyncTask;

  private void doNewTask(Params[] paramArrayOfParams)
  {
    SafeTask.1 local1 = new SafeTask.1(this);
    this.asyncTask = local1;
    AsyncTask localAsyncTask = this.asyncTask.execute(paramArrayOfParams);
  }

  protected abstract Result doInBackground(Params[] paramArrayOfParams);

  public final void execute(Params[] paramArrayOfParams)
  {
    if (this.asyncTask == null)
      doNewTask(paramArrayOfParams);
    while (true)
    {
      return;
      AsyncTask.Status localStatus1 = this.asyncTask.getStatus();
      AsyncTask.Status localStatus2 = AsyncTask.Status.RUNNING;
      if (localStatus1 == localStatus2)
        continue;
      boolean bool = this.asyncTask.cancel(1);
      doNewTask(paramArrayOfParams);
    }
  }

  public boolean isRunning(int paramInt)
  {
    return false;
  }

  protected void onCancelled()
  {
  }

  protected void onPostExecute(Result paramResult)
  {
  }

  protected void onPreExecute()
  {
  }

  protected void onProgressUpdate(Progress[] paramArrayOfProgress)
  {
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.android.SafeTask
 * JD-Core Version:    0.6.0
 */